package com.kinglone.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.kinglone.dao.UserMapper;
import com.kinglone.model.User;
import com.kinglone.model.UserVo;
import com.kinglone.service.UserService;

@Service("userService") 
public class UserServiceImpl implements UserService{

	@Resource  
    private UserMapper userDao;
	
	@Override
	public User getUserById(int userId) {
		return this.userDao.selectByPrimaryKey(userId);
	}

	@Override
	public void regist(User user) {
		 userDao.addUser(user);		
	}

	@Override
	public void save(User user) {
		userDao.addUser(user);
		
	}

	@Override
	public List<String> getListByUserName() {		
		return this.userDao.getListByUserName();
	}

	@Override
	public List<UserVo> getAll() {
		return userDao.getAll();
	}

}
